package tp.pr4.listeners;

import tp.pr4.Direction;
import tp.pr4.Place;
import tp.pr4.instructions.Instruction;
import tp.pr4.items.Item;
import tp.pr4.items.ItemContainer;

public interface RobotListener {
	/**
	 * Function is called whenever a fuel change is detected
	 */
	public void onFuelChanged(int newFuel);
	/**
	 * Functions is called by the robot whenever the points increment/decrement
	 */
	public void onPointsChanged(int newPoints);
	/**
	 * Funcion is called when the inventory changes (an item is added or removed from it)
	 */
	public void onInventoryChanged(ItemContainer inventory, Place where);
	
	/**
	 * Called when the robot uses an item
	 * @param usedItem
	 * @param direction
	 */
	public void onItemUsed(Item usedItem, Direction direction);
	
	/**
	 * Called when the execution of an instruction fails
	 * @param c Instruction that failed
	 */
	public void onInstructionFailed(Instruction c);
	
	/**
	 * Called when the robot dies
	 */
	public void onDeath();
}
